const {enableSubTypeDefaulter} = require("echarts/lib/util/component");

exports.barcodeprint = function(e){
    try{
        window.external.iprintgrf(1, 'LPN',  e);
    }catch (errr) {
        alert(errr);
    }
}


exports.birtprint = function(e,v){
    try{
        window.external.irptprint(2, e,  v);
    }catch (errr) {
        alert(errr);
    }
}

exports.grfprint = function(e,v){
    try{
        window.external.iprintgrf(1, e,  v);
    }catch (errr) {
        alert(errr);
    }
}

exports.bcgrfprint = function(e,v){
    try{
        window.external.iprintgrf(1, e,  v);
    }catch (errr) {
        alert(errr);
    }
}

exports.sendTb = function(e) {
    try{
        window.external.sendwebsocket("ws://localhost:13528", e);
    }catch (errr) {
        alert(errr);
    }
}

exports.sendPdd = function(e) {
    try{
        window.external.sendwebsocket("ws://localhost:5000", e);
    }catch (errr) {
        alert(errr);
    }
}

exports.sendJD = function(e) {
    try{
        window.external.sendwebsocket("ws://localhost:9113", e);
    }catch (errr) {
        alert(errr);
    }
}
